// File:    TnDuongFactory.cs
// Author:  HT
// Created: Tuesday, October 18, 2011 4:07:32 PM
// Purpose: Definition of Class TnDuongFactory

using System;
using ESRI.ArcGIS.Geodatabase;

namespace Tayninh2011
{
   public class TnDuongFactory
   {
       ITnToolsWorkspace toolWsp = new TnTools();
      public TnDuong GetDuong(EnumLoaiDuong loaiduong,IWorkspaceEdit wsp)
      {
          switch (loaiduong)
          {
              case EnumLoaiDuong.dp_loai1_buff_05:
                  return new TnDuongLoai1(toolWsp.OpenFeatureClassFromSDE(wsp,"tn_duong_buff_05"));
              case EnumLoaiDuong.dp_loai1:
                  return new TnDuongLoai1(toolWsp.OpenFeatureClassFromSDE(wsp,"tn_duong"));
              case EnumLoaiDuong.dp_loai1_buff_50:
                  return new TnDuongLoai1(toolWsp.OpenFeatureClassFromSDE(wsp, "tn_duong_buff_50"));
              case EnumLoaiDuong.dp_loai1_buff_1:
                  return new TnDuongLoai1(toolWsp.OpenFeatureClassFromSDE(wsp, "tn_duong_buff_1"));
              default: return null;
          }
      }
   
   }
}
